package org.aersoft.jokebook.dao.api;

import java.util.ArrayList;

import org.aersoft.jokebook.beans.ItemBean;
import org.aersoft.jokebook.dao.AppDAO;

import android.content.Context;

/**
 * Interface to the AppDAO class.
 * @author Danilo de Godoy Carolino.
 * @see {@link AppDAO} class.
 */
public interface IAppDAO {

	/**
	 * Get the current context of application.
	 * @param context of {@link Context} type.
	 * @return a instance of {@link AppDAO} class.
	 */
	public AppDAO getContext(Context context);

	/**
	 * Get the list items by the category ID.
	 * @param id of {@link Integer} type.
	 * @return the list beans of {@link ArrayList} type.
	 */
	public ArrayList<ItemBean> getJokeListByCategory(int id);

	/**
	 * Get a item by the category ID.
	 * @param id of {@link Integer} type.
	 * @return a bean of {@link ItemBean} type.
	 */
	public ItemBean getJokeById(int id);

	/**
	 * Get all categories.
	 */
	public ArrayList<ItemBean> getJokeAllCategories();

	/**
	 * Close the database connection.
	 */
	public void close();
}
